// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者，助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件，未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------

import request from '@/utils/request'

/**
 * 新增抽奖
 */
export function addChoujiang(data) {
  return request({
      url: '/admin/activity/draw/save',
      method: 'post',
      data,
  })
}

export function choujiangBuyTimeList(params) {
  return request({
      url: '/admin/activity/draw/buyTimeList',
      method: 'get',
      params,
  })
}

/**
 * 删除抽奖
 */
export function delChoujiang(id) {
  return request({
    url: '/admin/activity/draw/delete',
    method: 'get',
    params: {
      id
    }
  })
}

export function choujiangInfo(id) {
  return request({
    url: `/admin/activity/draw/info/${id}`,
    method: 'get',
  })
}


// 参与记录
export function getChoujiangRecord(params) {
  return request({
      url: '/admin/activity/draw/recordList',
      method: 'get',
      params
  })
}






/**
 * 获取抽奖
 */
export function getChoujiangList(params) {
    return request({
        url: '/admin/activity/marketing/list',
        method: 'get',
        params
    })
}

  /**
 * 更新抽奖
 */
export function updateChoujiang(data) {
    return request({
      url: '/admin/activity/draw/update',
      method: 'post',
      data,
    })
  }

export function getMerchantAll() {
  return request({
      url: '/admin/merchant/all',
      method: 'get',
  })
}
export function getSupplierAll() {
  return request({
      url: '/admin/supplier/all',
      method: 'get',
  })
}
  



